package com.alangyun.remind.repository.algorithm;

/**
 * 三年投票情况枚举
 *
 * @class com.alangyun.remind.repository.algorithm.VoteLevel
 * @company 北京诚朗信息技术有限公司
 * @author hoobort klxukun@126.com
 * @datetime 2022年11月23日 下午4:44:47
 *
 */
public enum VoteLevel implements IFactorEnum {
	YX("优秀",2, 0.0, 0.0),
	CZ("称职",1, 0.0, 0.0),
	JBCZ("基本称职",0.5, 0.0, 0.0),
	BHG("不合格",-2, 0.0, 0.0);

	private String keyCode;
	private double standVal;
	private double minVal;
	private double maxVal;

	private VoteLevel(String k, double standard, double min, double max) {
		this.keyCode = k;
		this.standVal = standard;
		this.minVal = min;
		this.maxVal = max;
	}

	public String key() {
		return keyCode;
	}

	public double standard() {
		return standVal;
	}

	public double min() {
		return minVal;
	}

	public double max() {
		return maxVal;
	}

	public static VoteLevel keyOf(String key) {
		VoteLevel ret =null;
		if(YX.key().equals(key))
			ret = YX;
		else if(CZ.key().equals(key))
			ret = CZ;
		else if(JBCZ.key().equals(key))
			ret = JBCZ;
		else if(BHG.key().equals(key))
			ret = BHG;
		
		return ret;
	}
}
